#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int main()
{
    int arr[] = { 3, 2, 4 };
    int answer[2] = { 0 };
    int n = 0;
    scanf("%d", &n);
    int sz = sizeof(arr) / sizeof(arr[0]);
    for (int i = 0; i < sz; i++)
    {
        for (int j = i + 1; j < sz; j++)
        {
            if (n == arr[i] + arr[j])
            {
                answer[0] = i + 1;
                answer[1] = j + 1;
            }
        }
    }
    printf("%d %d", answer[0], answer[1]);
	return 0;
}













